package com.dk.controller;

import com.dk.pojo.MdItem;
import com.dk.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author LTZ
 * @create 2023/5/11
 */
@RestController
@RequestMapping("item")
@RefreshScope
public class ItemController {

    @Autowired
    private ItemService itemService;

    @GetMapping("selectByItemCode")
    public MdItem selectByItemCode(@RequestParam String itemCode){
        return itemService.selectByItemCode(itemCode);
    }
}